<?php
/**
 *  💡 免责声明：本软件不得用于商业用途，仅做学习交流
 *  ⚠️ 权利声明：本软件由版权人提供产品技术支持
 *  📅 项目编号：NX2025-0135
 */
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateTermPoliciesTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('term_policies', function (Blueprint $table) {
            $table->id();
            $table->string('title')->comment('标题');          // 条款标题（如 "隐私政策"）
            $table->text('content')->comment('内容');
            $table->string('slug')->unique()->comment('标识'); // 条款内容（HTML 或 Markdown）
            $table->timestamps();
        });
        \Illuminate\Support\Facades\DB::statement("ALTER TABLE `term_policies` comment '隐私政策'");
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('term_policies');
    }
}
